package com.cloud.lan.api;

import com.cloud.lan.api.dto.req.BaseReq;
import com.cloud.lan.api.dto.req.LanGoodsReq;
import com.cloud.lan.entity.base.BaseResponse;
import com.cloud.lan.service.ILanGoodsService;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import lombok.extern.slf4j.Slf4j;

/**
 * 产品 入口
 * @author ErKang
 * @date Created in 2021/05/2 04:24
 * @title LanUserFavouritesApi.java
 * Department: Product development
 */
@Slf4j
@RestController
@RequestMapping(value = {"/v1/goods/"}, method = {RequestMethod.GET, RequestMethod.POST}, consumes = {"*/*"}, produces = {"application" +
        "/json"})
public class LanGoodsApi {

    @Resource
    ILanGoodsService lanGoodsService;

    @RequestMapping("getGoodsList")
    public BaseResponse<Object> getGoodsList(@RequestHeader(BaseReq.ut) String token, @RequestBody LanGoodsReq req) {
        return lanGoodsService.getGoodsList(req);
    }
}
